package com.ruoyi.web.controller.system;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.domain.vo.response.ServeDetailVo;
import com.ruoyi.system.mapper.ServiceItemMapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author czg
 * @date 2021/9/25 10:32 上午
 */


@Api(tags = "后台配置六个服务项详情")
@RestController
@RequestMapping("/api/serve")
public class ServeQueryController {

    @Autowired
    ServiceItemMapper serviceItemMapper;

    @GetMapping("/student/grade")
    @ApiOperation("学生成绩查询服务详情")
    public AjaxResult<ServeDetailVo> getStudentGradeServeDetail() {
        return AjaxResult.success(serviceItemMapper.getStudentGradeServeDetail());
    }

    @GetMapping("/student/classroom/yuYue")
    @ApiOperation("自习室预约服务详情")
    public AjaxResult<ServeDetailVo> getClassroomYuYueDetail() {
        return AjaxResult.success(serviceItemMapper.getClassroomYuYueDetail());
    }

    @GetMapping("/student/pingJia")
    @ApiOperation("评教服务详情")
    public AjaxResult<ServeDetailVo> getPingJiaDetail() {
        return AjaxResult.success(serviceItemMapper.getPingJiaDetail());
    }

    @GetMapping("/student/keYan")
    @ApiOperation("科研成果查看服务详情")
    public AjaxResult<ServeDetailVo> getKeYanDetail() {
        return AjaxResult.success(serviceItemMapper.getKeYanDetail());
    }

    @GetMapping("/student/stadium")
    @ApiOperation("体育馆预约服务详情")
    public AjaxResult<ServeDetailVo> getStadiumDetail() {
        return AjaxResult.success(serviceItemMapper.getStadiumDetail());
    }

    @GetMapping("/student/jobRecommend")
    @ApiOperation("就业推荐服务详情")
    public AjaxResult<ServeDetailVo> getJobRecommendDetail() {
        return AjaxResult.success(serviceItemMapper.getJobRecommendDetail());
    }
}
